import ProxyInterface from '../proxy-interface';
import { ResumesModel, UserModel } from '../model/user';

class UserModelProxy implements ProxyInterface<UserModel> {
  public userModel = new UserModel();

  constructor (responseData) {
    const data = responseData.data || responseData;
    Object.assign<UserModel, UserModel>(this.userModel, data)
  }

  getModel (): UserModel {
    return this.userModel;
  }
}

class UserResumesModelProxy implements ProxyInterface<ResumesModel> {
  public resumesModel = new ResumesModel();

  constructor (responseData) {
    const data = responseData.data || responseData;
    Object.assign<ResumesModel, any>(this.resumesModel, data)
  }

  getModel (): ResumesModel {
    return this.resumesModel;
  }
}
export {
  UserResumesModelProxy,
  UserModelProxy
}
